package aecs

import (
	"fmt"

	"github.com/aliyun/alibaba-cloud-sdk-go/services/ecs"
)

// 可获取账号下所有云服务器的状态。
func (c *Client) DescribeInstanceStatus(req *ecs.DescribeInstanceStatusRequest) (response *ecs.DescribeInstanceStatusResponse, err error) {
	client := c.Client
	req.Method = "GET"
	req.Port = "8788"
	response, err = client.DescribeInstanceStatus(req)

	if err != nil {
		return nil, fmt.Errorf("error DescribeInstanceStatus %w", err)
	}

	return response, nil
}
